<!-- 下载插件screenfull实现全屏切换 -->
<template>
 <div style="margin-right: 10px;">
<span><a><i :class=" !isFullscreen?'iconfont icon-quanpingmu':'iconfont  icon-zhengchangpingmudaxiao'" 
   @click="screenfull.toggle()"></i></a></span>
 </div>
</template>
<script setup lang="ts">
import screenfull from 'screenfull'
import {ref} from 'vue'
const isFullscreen=ref(false)//控制切换图标
// 控制esc设置
screenfull.on('change', () => {
   // screenfull是插件，它自带事件监听 on
    // screenfull.isFullscreen ：插件自带的属性，表示当前是否处于全屏状态
      isFullscreen.value = screenfull.isFullscreen
    })
</script>